package com.oocl.chat.util;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.oocl.chat.pojo.Message;

public class JsonConvertor {
	private Message message;
	public String getJsonString(){
		ObjectMapper mapper = new ObjectMapper();
		String jsonString = null;
		try {
			jsonString = mapper.writeValueAsString(message);
		} catch (JsonProcessingException e1) {
			e1.printStackTrace();
		}
		return jsonString;
	}
	public JsonConvertor(Message message) {
		super();
		this.message = message;
	}
}
